package com.qingjiang.projectschedule.utils;

import org.apache.poi.ss.usermodel.Row;
import org.apache.poi.ss.usermodel.Sheet;

public class CheckExcel {
    public static int getRowCount(Sheet sheet) {
        for (int i = 2; i < 1000; i++) {
            Row row = sheet.getRow(i);
            if (row == null || row.getCell(0) == null) return i;
            else {
                String s = row.getCell(0).toString();
                if (s == "" || s == null) return i;
            }
        }
        return -1;
    }
}
